Analysis date: 2023-02-10

Depends on

DIPG_FirstBatch_DataProcessing Script

load("../Data/Cache/Xenografts_Batch1_2_DataProcessing.RData")

TODO

  • Do differential abudance analysis for prep batch and mass spec run

Setup

Load libraries and functions

Analysis

DEP

Tyrosine all

Each condition vs ctrl

data_diff_ctrl_vs_E_pY <- test_diff(pY_se_Set1, type="manual", test = "E_vs_ctrl")
## Tested contrasts: E_vs_ctrl
dep_ctrl_vs_E_pY <- add_rejections_SH(data_diff_ctrl_vs_E_pY, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_ctrl_vs_E_pY, contrast = "E_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pY") 
## Warning: `gather_()` was deprecated in tidyr 1.2.0.
## ℹ Please use `gather()` instead.
## ℹ The deprecated feature was likely used in the plotly package.
##   Please report the issue at <]8;;https://github.com/plotly/plotly.R/issueshttps://github.com/plotly/plotly.R/issues]8;;>.
Return_DEP_Hits_Plots(data = pY_Set1_form, dep_ctrl_vs_E_pY, comparison = "E_vs_ctrl_diff")
## Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
## ℹ Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(comparison)
## 
##   # Now:
##   data %>% select(all_of(comparison))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## 'select()' returned 1:1 mapping between keys and columns
## Loading required namespace: reactome.db
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                            pathway      pval
## 1: A tetrasaccharide linker sequence is required for GAG synthesis 0.3219316
## 2:                                       ABC transporter disorders 0.3501006
## 3:                          ABC-family proteins mediated transport 0.3501006
## 4:                       ADP signalling through P2Y purinoceptor 1 0.2273642
## 5:                                           ALK mutants bind TKIs 0.6953125
## 6:               APC/C-mediated degradation of cell cycle proteins 0.9683698
##         padj    log2err         ES        NES size leadingEdge
## 1: 0.8702169 0.10473282  0.8430233  1.1431478    1        6385
## 2: 0.8702169 0.09957912  0.8255814  1.1194965    1        5687
## 3: 0.8702169 0.09957912  0.8255814  1.1194965    1        5687
## 4: 0.8702169 0.12814292  0.8895349  1.2062180    1        1432
## 5: 0.9703706 0.06143641 -0.6569767 -0.8823673    1        1213
## 6: 0.9814049 0.05617666  0.3859649  0.6052109    2        5687

## Note: Row-scaling applied for this heatmap

data_diff_EC_vs_ctrl_pY <- test_diff(pY_se_Set1, type="manual", test = "EC_vs_ctrl")
## Tested contrasts: EC_vs_ctrl
dep_EC_vs_ctrl_pY <- add_rejections_SH(data_diff_EC_vs_ctrl_pY, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EC_vs_ctrl_pY, contrast = "EC_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pY") 
Return_DEP_Hits_Plots(data = pY_Set1_form, dep_EC_vs_ctrl_pY, comparison = "EC_vs_ctrl_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns
##                                                            pathway      pval
## 1: A tetrasaccharide linker sequence is required for GAG synthesis 0.6124031
## 2:                                       ABC transporter disorders 0.7926357
## 3:                          ABC-family proteins mediated transport 0.7926357
## 4:                       ADP signalling through P2Y purinoceptor 1 0.2984496
## 5:                                           ALK mutants bind TKIs 0.6404040
## 6:               APC/C-mediated degradation of cell cycle proteins 0.6906077
##         padj    log2err         ES        NES size leadingEdge
## 1: 0.9804885 0.06720651  0.6918605  0.9340944    1        6385
## 2: 0.9804885 0.05490737  0.5813953  0.7849533    1        5687
## 3: 0.9804885 0.05490737  0.5813953  0.7849533    1        5687
## 4: 0.9804885 0.10714024  0.8662791  1.1695804    1        1432
## 5: 0.9804885 0.06705126 -0.6744186 -0.9142164    1        1213
## 6: 0.9804885 0.05896945 -0.5518113 -0.8639961    2         983
## Warning in min(screen_pval05_neg[, logFcColStr]): no non-missing arguments to
## min; returning Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(x): no non-missing arguments to min; returning Inf
## Warning in max(x): no non-missing arguments to max; returning -Inf
## Warning in min(cs1s, na.rm = TRUE): no non-missing arguments to min; returning
## Inf
## Warning in max(cs1s, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in min(cs2s, na.rm = TRUE): no non-missing arguments to min; returning
## Inf
## Warning in max(cs2s, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in min(cs3s, na.rm = TRUE): no non-missing arguments to min; returning
## Inf
## Warning in max(cs3s, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf

## Note: Row-scaling applied for this heatmap

Plot_Enrichment_Single_Pathway(dep_EC_vs_ctrl_pY, comparison = "EC_vs_ctrl_diff", 
                               pw = "Epigenetic regulation of gene expression")
data_diff_EBC_vs_ctrl_pY <- test_diff(pY_se_Set1, type="manual", test = "EBC_vs_ctrl")
## Tested contrasts: EBC_vs_ctrl
dep_EBC_vs_ctrl_pY <- add_rejections_SH(data_diff_EBC_vs_ctrl_pY, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EBC_vs_ctrl_pY, contrast = "EBC_vs_ctrl", 
                 add_names = TRUE,
                additional_title = "pY")
Return_DEP_Hits_Plots(data = pY_Set1_form, dep_EBC_vs_ctrl_pY, comparison = "EBC_vs_ctrl_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                            pathway      pval
## 1: A tetrasaccharide linker sequence is required for GAG synthesis 0.4151329
## 2:                                       ABC transporter disorders 0.9213052
## 3:                          ABC-family proteins mediated transport 0.9213052
## 4:                       ADP signalling through P2Y purinoceptor 1 0.8875256
## 5:                                           ALK mutants bind TKIs 0.2053743
## 6:               APC/C-mediated degradation of cell cycle proteins 0.4480409
##         padj    log2err         ES        NES size leadingEdge
## 1: 0.9343269 0.09054289 -0.7790698 -1.0625762    1        6385
## 2: 0.9658217 0.04754342  0.5348837  0.7313084    1        5687
## 3: 0.9658217 0.04754342  0.5348837  0.7313084    1        5687
## 4: 0.9658217 0.05216303 -0.5581395 -0.7612486    1        1432
## 5: 0.8935583 0.13214726  0.8779070  1.2002996    1        1213
## 6: 0.9343269 0.07647671 -0.6679829 -1.0309284    2         983

## Note: Row-scaling applied for this heatmap

EC vs E

data_diff_EC_vs_E_pY <- test_diff(pY_se_Set1, type = "manual", 
                              test = c("EC_vs_E"))
## Tested contrasts: EC_vs_E
dep_EC_vs_E_pY <- add_rejections_SH(data_diff_EC_vs_E_pY, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EC_vs_E_pY, contrast = "EC_vs_E",  add_names = TRUE, additional_title = "pY", proteins_of_interest = "EGFR")
Return_DEP_Hits_Plots(data = pY_Set1_form, dep_EC_vs_E_pY, comparison = "EC_vs_E_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                            pathway      pval
## 1: A tetrasaccharide linker sequence is required for GAG synthesis 0.2920696
## 2:                                       ABC transporter disorders 0.1566731
## 3:                          ABC-family proteins mediated transport 0.1566731
## 4:                       ADP signalling through P2Y purinoceptor 1 0.8142857
## 5:                                           ALK mutants bind TKIs 0.1959184
## 6:               APC/C-mediated degradation of cell cycle proteins 0.3647059
##         padj    log2err         ES        NES size leadingEdge
## 1: 0.7036232 0.10839426 -0.8430233 -1.1437044    1        6385
## 2: 0.6614330 0.15419097 -0.9127907 -1.2383558    1        5687
## 3: 0.6614330 0.15419097 -0.9127907 -1.2383558    1        5687
## 4: 0.9136051 0.05605959  0.5930233  0.7873775    1        1432
## 5: 0.6710708 0.14040624  0.9069767  1.2042244    1        1213
## 6: 0.7529467 0.10672988 -0.7251462 -1.1327565    2    5687,983
#data_results <- get_df_long(dep)

EBC vs EC

data_diff_EBC_vs_EC_pY <- test_diff(pY_se_Set1, type = "manual", 
                              test = c("EBC_vs_EC"))
## Tested contrasts: EBC_vs_EC
dep_EBC_vs_EC_pY <- add_rejections_SH(data_diff_EBC_vs_EC_pY, alpha = 0.05, lfc = log2(1.2))
GGPlotly_Volcano(dep_EBC_vs_EC_pY, contrast = "EBC_vs_EC",  add_names = TRUE, additional_title = "pY")
Return_DEP_Hits_Plots(data = pY_Set1_form, dep_EBC_vs_EC_pY, comparison = "EBC_vs_EC_diff")
## 'select()' returned 1:1 mapping between keys and columns
## 'select()' returned 1:many mapping between keys and columns
## 'select()' returned 1:1 mapping between keys and columns

##                                                            pathway      pval
## 1: A tetrasaccharide linker sequence is required for GAG synthesis 0.1011673
## 2:                                       ABC transporter disorders 0.9533074
## 3:                          ABC-family proteins mediated transport 0.9533074
## 4:                       ADP signalling through P2Y purinoceptor 1 0.1595331
## 5:                                           ALK mutants bind TKIs 0.3385214
## 6:               APC/C-mediated degradation of cell cycle proteins 0.8342541
##         padj    log2err         ES        NES size leadingEdge
## 1: 0.4384030 0.19578900 -0.9476744 -1.2667050    1        6385
## 2: 0.9754072 0.04660151 -0.5232558 -0.6994077    1        5687
## 3: 0.9754072 0.04660151 -0.5232558 -0.6994077    1        5687
## 4: 0.5845533 0.15315881 -0.9186047 -1.2278491    1        1432
## 5: 0.8158104 0.09957912 -0.8313953 -1.1112811    1        1213
## 6: 0.9754072 0.05019343 -0.5263158 -0.7832006    2    983,5687
#data_results <- get_df_long(dep)

Session Info

sessionInfo()
## R version 4.1.3 (2022-03-10)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur/Monterey 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] forcats_0.5.2               stringr_1.4.1              
##  [3] dplyr_1.0.10                purrr_0.3.5                
##  [5] readr_2.1.3                 tidyr_1.2.1                
##  [7] tibble_3.1.8                ggplot2_3.3.6              
##  [9] tidyverse_1.3.2             mdatools_0.13.0            
## [11] SummarizedExperiment_1.24.0 GenomicRanges_1.46.1       
## [13] GenomeInfoDb_1.30.1         MatrixGenerics_1.6.0       
## [15] matrixStats_0.62.0          DEP_1.16.0                 
## [17] org.Hs.eg.db_3.14.0         AnnotationDbi_1.56.2       
## [19] IRanges_2.28.0              S4Vectors_0.32.4           
## [21] Biobase_2.54.0              BiocGenerics_0.40.0        
## [23] fgsea_1.20.0               
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.2             shinydashboard_0.7.2   proto_1.0.0           
##   [4] gmm_1.7                tidyselect_1.2.0       RSQLite_2.2.18        
##   [7] htmlwidgets_1.5.4      grid_4.1.3             BiocParallel_1.28.3   
##  [10] norm_1.0-10.0          munsell_0.5.0          codetools_0.2-18      
##  [13] preprocessCore_1.56.0  chron_2.3-58           DT_0.26               
##  [16] withr_2.5.0            colorspace_2.0-3       highr_0.9             
##  [19] knitr_1.40             rstudioapi_0.14        mzID_1.32.0           
##  [22] labeling_0.4.2         GenomeInfoDbData_1.2.7 bit64_4.0.5           
##  [25] farver_2.1.1           pheatmap_1.0.12        vctrs_0.5.0           
##  [28] generics_0.1.3         xfun_0.34              R6_2.5.1              
##  [31] doParallel_1.0.17      clue_0.3-62            MsCoreUtils_1.6.2     
##  [34] bitops_1.0-7           cachem_1.0.6           DelayedArray_0.20.0   
##  [37] assertthat_0.2.1       promises_1.2.0.1       scales_1.2.1          
##  [40] googlesheets4_1.0.1    gtable_0.3.1           affy_1.72.0           
##  [43] sandwich_3.0-2         rlang_1.0.6            mzR_2.28.0            
##  [46] GlobalOptions_0.1.2    lazyeval_0.2.2         gargle_1.2.1          
##  [49] impute_1.68.0          broom_1.0.1            BiocManager_1.30.19   
##  [52] yaml_2.3.6             modelr_0.1.9           crosstalk_1.2.0       
##  [55] backports_1.4.1        httpuv_1.6.6           tools_4.1.3           
##  [58] affyio_1.64.0          ellipsis_0.3.2         gplots_3.1.3          
##  [61] jquerylib_0.1.4        RColorBrewer_1.1-3     STRINGdb_2.6.5        
##  [64] MSnbase_2.20.4         gsubfn_0.7             Rcpp_1.0.9            
##  [67] hash_2.2.6.2           plyr_1.8.7             zlibbioc_1.40.0       
##  [70] RCurl_1.98-1.9         sqldf_0.4-11           GetoptLong_1.0.5      
##  [73] zoo_1.8-11             haven_2.5.1            cluster_2.1.4         
##  [76] fs_1.5.2               magrittr_2.0.3         data.table_1.14.4     
##  [79] circlize_0.4.15        reprex_2.0.2           reactome.db_1.77.0    
##  [82] googledrive_2.0.0      pcaMethods_1.86.0      mvtnorm_1.1-3         
##  [85] ProtGenerics_1.26.0    hms_1.1.2              mime_0.12             
##  [88] evaluate_0.17          xtable_1.8-4           XML_3.99-0.12         
##  [91] readxl_1.4.1           gridExtra_2.3          shape_1.4.6           
##  [94] compiler_4.1.3         KernSmooth_2.23-20     ncdf4_1.19            
##  [97] crayon_1.5.2           htmltools_0.5.3        later_1.3.0           
## [100] tzdb_0.3.0             lubridate_1.8.0        DBI_1.1.3             
## [103] dbplyr_2.2.1           ComplexHeatmap_2.10.0  MASS_7.3-58.1         
## [106] tmvtnorm_1.5           Matrix_1.5-1           cli_3.4.1             
## [109] vsn_3.62.0             imputeLCMD_2.1         parallel_4.1.3        
## [112] igraph_1.3.5           pkgconfig_2.0.3        plotly_4.10.0         
## [115] MALDIquant_1.21        xml2_1.3.3             foreach_1.5.2         
## [118] bslib_0.4.0            XVector_0.34.0         rvest_1.0.3           
## [121] digest_0.6.30          Biostrings_2.62.0      rmarkdown_2.17        
## [124] cellranger_1.1.0       fastmatch_1.1-3        shiny_1.7.3           
## [127] gtools_3.9.3           rjson_0.2.21           lifecycle_1.0.3       
## [130] jsonlite_1.8.3         viridisLite_0.4.1      limma_3.50.3          
## [133] fansi_1.0.3            pillar_1.8.1           lattice_0.20-45       
## [136] KEGGREST_1.34.0        fastmap_1.1.0          httr_1.4.4            
## [139] plotrix_3.8-2          glue_1.6.2             fdrtool_1.2.17        
## [142] png_0.1-7              iterators_1.0.14       bit_4.0.4             
## [145] stringi_1.7.8          sass_0.4.2             blob_1.2.3            
## [148] caTools_1.18.2         memoise_2.0.1
knitr::knit_exit()